local M={}

function M:Awake()
    self.score=self.GameObject:FindChild("score")
    self.pipe=self.GameObject:FindChild("pipe")
    local props=self.score:AttachScript("TestBed.props")
    props.score=1
    props=self.pipe:AttachScript("TestBed.props")
    props.score=-1
    
    self.traps=Alice.GameObject.Find("traps")
end

function M:Update(delta)
    if stop then
        return
    end
    
    local x,y,z=self.GameObject:GetPosition()
    x=x-delta*10
    --Alice.Console.Debug(delta)
    self.GameObject:SetPosition(x,y,z)
    if x<-200 then
       -- self.traps:Call("OnBottomTrapEnd",self.GameObject)
    end
end

return M